<?php 
	slot('title', 'VO-SER :: User List' );
	slot('header', "<h2>VO-SER - User list</h2>");
	slot('side_bar', ' ');
	slot('footer');
		include_partial('footer');
	end_slot();
?>
<?php if($flash): ?>
<div id="flash"><?php echo $flash ?></div>
<?php endif ?>

<div id="userlist">
	<?php foreach($users as $u): ?>
		<div class="user">
			<?php echo $u->getName().' - '.
			mail_to($u->getEmail(), $u->getEmail(), 'encode=true') ?>
			<?php if($admin): ?>
			<?php echo ' :: '.link_to('Edit', $u->getEditUrl()) ?>
			<?php echo ' :: '.link_to('Delete', $u->getDeleteUrl(), "confirm=Are you sure you want to delete {$u->getName()}?") ?>
			<?php endif ?>
		</div>
	<?php endforeach ?>
</div>
